package com.mano.mall.service.feign;

import com.alibaba.fastjson.JSONObject;
import com.mano.mall.api.weichat.VerificaCodeService;
import com.mano.mall.common.base.BaseApiService;
import com.mano.mall.common.base.BaseResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;

@FeignClient(value = "mano-mall-weichat",fallback = VerificaCodeServiceFeignCallBack.class)
public interface VerificaCodeServiceFeign extends VerificaCodeService {
}

@Component
class VerificaCodeServiceFeignCallBack extends BaseApiService implements VerificaCodeServiceFeign{
    @Override
    public BaseResponse<JSONObject> verificaWeixinCode(String phone, String weixinCode) {
        return setResultError("服务器忙，请稍后重试");
    }
}